<template>
  <view :class="{'w-bright-block': true, 'w-bright-block-primary': type === 'primary'}">
    <uv-alert
      :type="type"
      :title="$t(content)"
      :closable="closable"
      @close="handleClose"
      :show-icon="!showIcon"
    />
  </view>
</template>

<script setup>
import { defineProps } from 'vue';

const props = defineProps({
  type: {
    type: String,
    default: 'primary'
  },
  closable: {
    type: Boolean,
    default: false
  },
  showIcon: {
    type: Boolean,
    default: false
  },
  content: String
});

// 处理关闭事件
const handleClose = () => {
  // 关闭逻辑
};
</script>

<style lang="scss" scoped>
.w-bright-block {
  width: 100%;
}
</style>
